﻿using Exiled.API.Features;
using System;
using VotingSystem;

[Vote("系统核弹", 0.7)]
public class AlphaWarhead : Votable
{
    public override string OnPassed()
    {
        Warhead.Start();
        Warhead.IsLocked = true;
        return "系统核弹已启动";
    }

    public override bool Launchable(Player player, out string response, Selection? selection)
    {
        if (player == null)
        {
            response = "必须指定一个发起者";
            return false;
        }
        if ((DateTime.Now - Round.StartedTime).TotalMinutes < 15)
        {
            response = "开局15分钟内不可发起系统核弹";
            return false;
        }
        response = "";
        return true;
    }
}